
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Term Report</title>
        <style type="text/css">
            body { font-family: arial; font-size: 11pt;}
            h1 {margin: 0;}
            td { vertical-align: top}
            p {margin: 0; margin-top:12px; margin-bottom:7px;}
            p.ident {margin: 0; padding-left:2px; padding-top:2px}
            .bakso {width: 760px; margin-bottom:20px;}
            .bakso td {}
            .box1 td {border: solid thin #888; margin-bottom: 0; padding: 5px 0;}
            .box3 td {border: solid thin #888; margin-bottom: 0; padding-bottom: 0; padding-top:5px;}
            .box1 p, .box3 p {padding-left: 7px; margin: 0; padding-bottom: 2px;}
            .box2 td, .box4 td  {border: solid thin #888; padding: 4px 7px 3px 7px;}
            .box2 p {margin: 0; padding: 0; margin-bottom: 5px;}
            .es td {border: none;border-top: solid thin #888;  padding: 0px 7px; padding-top: 3px;}
            .es2 td {border: none;border-top: solid thin #888;  padding: 5px 7px;  }
            .es2 p {padding-left: 0;  }
            .es p {padding-left: 0; margin: 0; padding-top: 2px; padding-bottom: 0px;}
            .es { margin-top:2px;}
            .es2 { margin-top:5px;}
            table { border-collapse:collapse;}
            .bandung1 {width: 80px}
            .bandung2 {width: 180px}
            .bandung3 {width: 65px}
            .bandung4 {width: 85px}
            #logocic { width:90px; height:auto; float:right}
            #logoterm { width:auto; height:50px; float:right; margin-right: 10px;}
            .essai {font-family: essai; padding-top:15; font-size:28pt; }
            .metro {width: 33%}
        .es1 {margin-top:2px;}
		.box5 td  {border: solid thin #888;}
		.es21 {margin-top:5px;}
		.noborder { border:none;}
		.noborder td { border:none; padding:}
		td.nopad {padding: 0;}
		td.yupo  { border-right: solid thin #888;}
		.w1, .w2, .w3, .w4 {float: left; padding-left: 5px; padding-top:5px;}
		.w1 {width:20px;}
		.w2 {width:100px;}
		.w3 {width:90px;}
		.w4 {width:160px;}
		.w5 {width:390px;}
        </style>
    </head>

<body>
        <p class="ih atasp">ComLabs USDI ITB | Term Report | Term-<?php echo $this->session->userdata('term') . ' ' . $this->session->userdata('tahun') ?></p>

        <!---->
        <table class="bakso" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <h1 class="essai">Rekap Pembayaran | <?php echo $kode . '-' . $angkatan ?></h1>
                    <p class="ident"><?php echo $this->date_func->date_konversion_format4v2(date('Y-m-d H.i')) ?> WIB</p>
                </td>
                <td width="130">
                    
                </td>
                <td width="100">
                    <img id="logocic" src="<?php echo base_url()?>images/logocic.png" />
                </td>
            </tr>
        </table>
        <table class="bakso" border="0" cellpadding="0" cellspacing="0" >
            <tr>
              <td><!--box2-->
                <p>Summary</p>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box2">
                  <tr>
                    <td>Peserta</td>
                    <td>Total</td>
                    <td>Masuk</td>
                    <td>Piutang</td>
                    <td>Lunas</td>
                  </tr>
                  <tr>
                    	<td><?php echo $jumlah_pendaftar ?> Orang</td>
                      	<td>Rp<?php echo number_format($total_harus_bayar, 0, ',', '.') ?></td>
                      	<td>Rp<?php echo number_format($pemasukan, 0, ',', '.') ?></td>
                      	<td>Rp<?php echo number_format($piutang, 0, ',', '.') ?></td>
                      	<td><?php echo number_format($persen_lunas, 1)?>%</td>
                  </tr>
                </table></td>
              <!--box2-->
          </tr>
            <tr>
              <td><!--box4-->
                <p>Detail  </p>
                <table border="0" cellpadding="0" cellspacing="0" class="box4" >
                  <tr>
                    <td>No</td>
                    <td>Nama Peserta</td>
                    <td>Diskon</td>
                    <td>Pembayaran</td>
                    <td>Keterangan</td>
                  </tr>
                  <?php $no = 1?>
                  <?php foreach ($pendaftar as $p) { ?>
                  <tr> 
                    <td><?php echo $no?></td>
                    <td><?php echo $p['NAMA']?> (<?php echo $p['GOL']?></td>
                    <td class="nopad"><table border="0" cellpadding="0" cellspacing="0" class="noborder">
                                <tr>
                                    <td><?php echo $p['get_diskon']?>%</td>
                                </tr>
                                <?php foreach($p['list_diskon'] as $l){?>
                                <tr>
                                    <td><?php echo $l?></td>
                                </tr>    
                                <?php } ?>
                    </table></td>
                    <td class="nopad">
                    <?php $n = 1; ?>
                    <?php foreach($p['pembayaran'] as $b){?>
                    <div class=" w5">
                    <div class="w1"><?php echo $n ?>)</div>
                    <div class="w2"><?php echo $b['TGL']?></div>
                    <div class="w3">Rp<?php echo number_format($b['JUMLAH'],0,',','.')?></div>
                    <div class="w4"><?php echo $b['NAMA_FO']?></div>
                    </div>
                    <div style="clear:both"></div>
                      <?php $n++;?>
                      <?php } ?>
					</td>
                    <td><?php echo $p['lunas']?></td>
                  </tr>
                  <?php $no++;?>
                  <?php } ?>
                </table>
                <!-----></td>
              <!--box4-->
            </tr>
</table>
        <p>&nbsp;</p>
<p>
          <!---->
          
</p>
        <!---->
    </body>
</html>
